package com.appwoo.txtws.component;

import java.io.PrintStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class MD5Builder
{
  static char[] hexDigits = { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70 };

  private static String byteToHexString(byte[] paramArrayOfByte)
  {
    char[] arrayOfChar = new char[32];
    int i = 0;
    int j = 0;
    while (true)
    {
      if (i >= 16)
        return new String(arrayOfChar);
      int k = paramArrayOfByte[i];
      int m = j + 1;
      arrayOfChar[j] = hexDigits[(0xF & k >>> 4)];
      j = m + 1;
      arrayOfChar[m] = hexDigits[(k & 0xF)];
      i++;
    }
  }

  public static String getMD5(String paramString)
  {
    try
    {
      String str = byteToHexString(MessageDigest.getInstance("MD5").digest(("http://www.help100.cn" + paramString).getBytes()));
      return str;
    }
    catch (NoSuchAlgorithmException localNoSuchAlgorithmException)
    {
      localNoSuchAlgorithmException.printStackTrace();
    }
    return null;
  }

  public static String getZjMD5(String paramString)
  {
    try
    {
      String str = byteToHexString(MessageDigest.getInstance("MD5").digest(paramString.getBytes()));
      return str;
    }
    catch (NoSuchAlgorithmException localNoSuchAlgorithmException)
    {
      localNoSuchAlgorithmException.printStackTrace();
    }
    return null;
  }

  public static void main(String[] paramArrayOfString)
  {
    System.out.println("zxq235转为md5值:" + getMD5("zxq235"));
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.component.MD5Builder
 * JD-Core Version:    0.6.2
 */